Optimal. Leaf size=149 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) \left (h^2 (2 c d-3 a f)+2 c g (2 e h+f g)\right )}{2 c^{5/2}}-\frac{h \sqrt{a+c x^2} (4 (c d g-a (e h+2 f g))+h x (2 c d-3 a f))}{2 a c^2}-\frac{(g+h x)^2 (a e-x (c d-a f))}{a c \sqrt{a+c x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.183902, antiderivative size = 149, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.138, Rules used = {1645, 780, 217, 206} \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) \left (h^2 (2 c d-3 a f)+2 c g (2 e h+f g)\right )}{2 c^{5/2}}-\frac{h \sqrt{a+c x^2} (4 (c d g-a (e h+2 f g))+h x (2 c d-3 a f))}{2 a c^2}-\frac{(g+h x)^2 (a e-x (c d-a f))}{a c \sqrt{a+c x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1645
Rule 780
Rule 217
Rule 206
Rubi steps
\begin{align*} \int \frac{(g+h x)^2 \left (d+e x+f x^2\right )}{\left (a+c x^2\right )^{3/2}} \, dx &=-\frac{(a e-(c d-a f) x) (g+h x)^2}{a c \sqrt{a+c x^2}}-\frac{\int \frac{(g+h x) (-a (f g+2 e h)+(2 c d-3 a f) h x)}{\sqrt{a+c x^2}} \, dx}{a c}\\ &=-\frac{(a e-(c d-a f) x) (g+h x)^2}{a c \sqrt{a+c x^2}}-\frac{h (4 (c d g-a (2 f g+e h))+(2 c d-3 a f) h x) \sqrt{a+c x^2}}{2 a c^2}+\frac{\left ((2 c d-3 a f) h^2+2 c g (f g+2 e h)\right ) \int \frac{1}{\sqrt{a+c x^2}} \, dx}{2 c^2}\\ &=-\frac{(a e-(c d-a f) x) (g+h x)^2}{a c \sqrt{a+c x^2}}-\frac{h (4 (c d g-a (2 f g+e h))+(2 c d-3 a f) h x) \sqrt{a+c x^2}}{2 a c^2}+\frac{\left ((2 c d-3 a f) h^2+2 c g (f g+2 e h)\right ) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{2 c^2}\\ &=-\frac{(a e-(c d-a f) x) (g+h x)^2}{a c \sqrt{a+c x^2}}-\frac{h (4 (c d g-a (2 f g+e h))+(2 c d-3 a f) h x) \sqrt{a+c x^2}}{2 a c^2}+\frac{\left ((2 c d-3 a f) h^2+2 c g (f g+2 e h)\right ) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{2 c^{5/2}}\\ \end{align*}
Mathematica [A] time = 0.301613, size = 177, normalized size = 1.19 \[ \frac{\sqrt{c} \left (a^2 h (4 e h+8 f g+3 f h x)+a c \left (-2 d h (2 g+h x)-2 e \left (g^2+2 g h x-h^2 x^2\right )+f x \left (-2 g^2+4 g h x+h^2 x^2\right )\right )+2 c^2 d g^2 x\right )-a^{3/2} \sqrt{\frac{c x^2}{a}+1} \sinh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) \left (3 a f h^2-2 c \left (h (d h+2 e g)+f g^2\right )\right )}{2 a c^{5/2} \sqrt{a+c x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.058, size = 327, normalized size = 2.2 \begin{align*}{\frac{{h}^{2}f{x}^{3}}{2\,c}{\frac{1}{\sqrt{c{x}^{2}+a}}}}+{\frac{3\,af{h}^{2}x}{2\,{c}^{2}}{\frac{1}{\sqrt{c{x}^{2}+a}}}}-{\frac{3\,af{h}^{2}}{2}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{5}{2}}}}+{\frac{{h}^{2}{x}^{2}e}{c}{\frac{1}{\sqrt{c{x}^{2}+a}}}}+2\,{\frac{{x}^{2}ghf}{c\sqrt{c{x}^{2}+a}}}+2\,{\frac{a{h}^{2}e}{{c}^{2}\sqrt{c{x}^{2}+a}}}+4\,{\frac{aghf}{{c}^{2}\sqrt{c{x}^{2}+a}}}-{\frac{dx{h}^{2}}{c}{\frac{1}{\sqrt{c{x}^{2}+a}}}}-2\,{\frac{egxh}{c\sqrt{c{x}^{2}+a}}}-{\frac{fx{g}^{2}}{c}{\frac{1}{\sqrt{c{x}^{2}+a}}}}+{d{h}^{2}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}+2\,{\frac{\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ) egh}{{c}^{3/2}}}+{f{g}^{2}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}-2\,{\frac{ghd}{c\sqrt{c{x}^{2}+a}}}-{\frac{e{g}^{2}}{c}{\frac{1}{\sqrt{c{x}^{2}+a}}}}+{\frac{{g}^{2}dx}{a}{\frac{1}{\sqrt{c{x}^{2}+a}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.05239, size = 1142, normalized size = 7.66 \begin{align*} \left [-\frac{{\left (2 \, a^{2} c f g^{2} + 4 \, a^{2} c e g h +{\left (2 \, a^{2} c d - 3 \, a^{3} f\right )} h^{2} +{\left (2 \, a c^{2} f g^{2} + 4 \, a c^{2} e g h +{\left (2 \, a c^{2} d - 3 \, a^{2} c f\right )} h^{2}\right )} x^{2}\right )} \sqrt{c} \log \left (-2 \, c x^{2} + 2 \, \sqrt{c x^{2} + a} \sqrt{c} x - a\right ) - 2 \,{\left (a c^{2} f h^{2} x^{3} - 2 \, a c^{2} e g^{2} + 4 \, a^{2} c e h^{2} - 4 \,{\left (a c^{2} d - 2 \, a^{2} c f\right )} g h + 2 \,{\left (2 \, a c^{2} f g h + a c^{2} e h^{2}\right )} x^{2} -{\left (4 \, a c^{2} e g h - 2 \,{\left (c^{3} d - a c^{2} f\right )} g^{2} +{\left (2 \, a c^{2} d - 3 \, a^{2} c f\right )} h^{2}\right )} x\right )} \sqrt{c x^{2} + a}}{4 \,{\left (a c^{4} x^{2} + a^{2} c^{3}\right )}}, -\frac{{\left (2 \, a^{2} c f g^{2} + 4 \, a^{2} c e g h +{\left (2 \, a^{2} c d - 3 \, a^{3} f\right )} h^{2} +{\left (2 \, a c^{2} f g^{2} + 4 \, a c^{2} e g h +{\left (2 \, a c^{2} d - 3 \, a^{2} c f\right )} h^{2}\right )} x^{2}\right )} \sqrt{-c} \arctan \left (\frac{\sqrt{-c} x}{\sqrt{c x^{2} + a}}\right ) -{\left (a c^{2} f h^{2} x^{3} - 2 \, a c^{2} e g^{2} + 4 \, a^{2} c e h^{2} - 4 \,{\left (a c^{2} d - 2 \, a^{2} c f\right )} g h + 2 \,{\left (2 \, a c^{2} f g h + a c^{2} e h^{2}\right )} x^{2} -{\left (4 \, a c^{2} e g h - 2 \,{\left (c^{3} d - a c^{2} f\right )} g^{2} +{\left (2 \, a c^{2} d - 3 \, a^{2} c f\right )} h^{2}\right )} x\right )} \sqrt{c x^{2} + a}}{2 \,{\left (a c^{4} x^{2} + a^{2} c^{3}\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (g + h x\right )^{2} \left (d + e x + f x^{2}\right )}{\left (a + c x^{2}\right )^{\frac{3}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.188, size = 296, normalized size = 1.99 \begin{align*} \frac{{\left ({\left (\frac{f h^{2} x}{c} + \frac{2 \,{\left (2 \, a c^{3} f g h + a c^{3} h^{2} e\right )}}{a c^{4}}\right )} x + \frac{2 \, c^{4} d g^{2} - 2 \, a c^{3} f g^{2} - 2 \, a c^{3} d h^{2} + 3 \, a^{2} c^{2} f h^{2} - 4 \, a c^{3} g h e}{a c^{4}}\right )} x - \frac{2 \,{\left (2 \, a c^{3} d g h - 4 \, a^{2} c^{2} f g h + a c^{3} g^{2} e - 2 \, a^{2} c^{2} h^{2} e\right )}}{a c^{4}}}{2 \, \sqrt{c x^{2} + a}} - \frac{{\left (2 \, c f g^{2} + 2 \, c d h^{2} - 3 \, a f h^{2} + 4 \, c g h e\right )} \log \left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + a} \right |}\right )}{2 \, c^{\frac{5}{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]